UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2eEkMmU14YsEFx+hw3KpQ51ezXId06YQm/hWRhyeT9A='
WHERE
key_id = 'bb713024653af1c2f31cce13432f3d3cf5a74111fb07a6e0d6cd0fa4da78d0c8'
AND (
token = '2eEkMmU14YsEFx+hw3KpQ51ezXId06YQm/hWRhyeT9A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)