UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+AW7gRNHPPEWQWIl5ku0QlZza81/N2Fu9E+/E+ygKno='
WHERE
key_id = '4fe35d2817e459451ea6df1b489f3e4cd7dee6c36b75b9e5e8a61c6bce7b793f'
AND (
token = '+AW7gRNHPPEWQWIl5ku0QlZza81/N2Fu9E+/E+ygKno='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)