UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/TGHNiqJkCMh1y0wxkaqWdvrO8maq2v712AEmtznhtg='
WHERE
key_id = '2a3a8a48cc9f59ef806357a2dcc03758ba02cebda58c8ba5f278a32c7d8e03a9'
AND (
token = '/TGHNiqJkCMh1y0wxkaqWdvrO8maq2v712AEmtznhtg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)