UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6BImbDEilR9G3MCSOdBRlcjjvt8dwO5s5MLzeGDRwpI='
WHERE
key_id = '7576dc54152bae0066b9fd5a81aa48daa3ff5c618a357d3ffdd02acb99f5dc98'
AND (
token = '6BImbDEilR9G3MCSOdBRlcjjvt8dwO5s5MLzeGDRwpI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)