UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'umBtGDuEJGAgh7yKr3gB/s+gvYNtLtcbn0QFy+PC6mQ='
WHERE
key_id = '30a5e86d64a13612615c10eaa78d4e9c196fa723028132e87ec28ab23a4c6105'
AND (
token = 'umBtGDuEJGAgh7yKr3gB/s+gvYNtLtcbn0QFy+PC6mQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)