UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/Fh18Cf0U+s3vOMtdLNiwv19wU35o6l54PL/e7F0ZRM=' 
WHERE 
  key_id = '43855e29a00a7c7f8a5d664f1f67a69b437a13320524547a9ff42b2bb866de93' 
  AND (
    token = '/Fh18Cf0U+s3vOMtdLNiwv19wU35o6l54PL/e7F0ZRM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017