UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zSk+2xqM7lCrMGAn2i6gHnA/7Dj/ECZEh/QDcKT9vSE='
WHERE
key_id = '5c0cbfdc389a248fd52923bd6cab73648ba6192630fe07c1c4b03c52d0bd3fd2'
AND (
token = 'zSk+2xqM7lCrMGAn2i6gHnA/7Dj/ECZEh/QDcKT9vSE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)