UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MXPH7ClqUXrP7kdIoQiEKnctkd4gLfhM9iKW6DjU3Ac=' 
WHERE 
  key_id = '89f355528517a8189ed00ccc0fd407a3a70b8626da008deb5013265c0c55ad93' 
  AND (
    token = 'MXPH7ClqUXrP7kdIoQiEKnctkd4gLfhM9iKW6DjU3Ac=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017