UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rRzu8T29FKlPgUTiZGO57Nk1/wxArrVTQOlmhaV0jq8='
WHERE
key_id = '73acbd48d0e4a6cc4357e12e1679857471b8c2bc201775c3a73f68fb7df2d9b8'
AND (
token = 'rRzu8T29FKlPgUTiZGO57Nk1/wxArrVTQOlmhaV0jq8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)