UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EMVmGcGblRUnh7OiZX7pw9TNOoTKp4Ssqc0yq82gLdQ=' 
WHERE 
  key_id = '53101818aa9de56d8943b4a3350685e8624cd3ebb4165dafa8e22abd839f93e3' 
  AND (
    token = 'EMVmGcGblRUnh7OiZX7pw9TNOoTKp4Ssqc0yq82gLdQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041