UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ePYNAnFL8zZcoo4ZjuWTr/Wk98RKCUw5iqnKH8hlhh4=' 
WHERE 
  key_id = '0406fb9123488cb3ad91348e30d010fc16ca6e821901e16f5d632d2656ba4946' 
  AND (
    token = 'ePYNAnFL8zZcoo4ZjuWTr/Wk98RKCUw5iqnKH8hlhh4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034