UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jvOFpiJyy+Ui1Gb2TxTpngddBk6iG1K4Mjgm0DOfwko=' 
WHERE 
  key_id = '4e22b3d22ec734dea0b12ecf17f8a97ddbfc0daa3d2012a48e81e9eeadac1e59' 
  AND (
    token = 'jvOFpiJyy+Ui1Gb2TxTpngddBk6iG1K4Mjgm0DOfwko=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033