UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Nw7JhPKZG+VHMGXv9gxGZ+p2J6KMpny9q6Ri7leV1qY='
WHERE
key_id = '60279ead37bae93f1ebb2e88217a75720eda87cf2464f9dc8bb877e5fa3ea5a7'
AND (
token = 'Nw7JhPKZG+VHMGXv9gxGZ+p2J6KMpny9q6Ri7leV1qY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)