UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EZcL+ybN3/Y8rmh2RBk9HaCHfapGpn0itvAymp3C5RA='
WHERE
key_id = '2718db403b5f2d92ae79f18c3006a7dab83ecb8ed7cb97511ca0418abaeb01b6'
AND (
token = 'EZcL+ybN3/Y8rmh2RBk9HaCHfapGpn0itvAymp3C5RA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)